package com.cloud.producter.ctrl;

import com.base.dto.Params;
import com.base.dto.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description:
 * Copyright: Copyright (c) 2023
 * Company: Ruijie Co., Ltd.
 * Create Time: 2024/7/20
 *
 * @author linke
 */
@RestController
@RequestMapping("producer")
public class ProducerController {

    @GetMapping("get/{name}")
    public Result producer(@PathVariable String name) {
        System.out.println(name);
        return new Result(0, "pro"+name);
    }

    @PostMapping("post")
    public Result post(@RequestBody Params params) {
        System.out.println(params.toString());
        return new Result(0, params.toString());
    }
}
